package cate.game.role.pvp.videohall.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBVideoHall;
import easy.java.dev.note.NoteField;
import easy.java.practice.errorcode.EcResult;


@ClientMsg(title = "录像快照详情 の 请求")
public class VideoHeroDetailReq implements MsgInput {
    @NoteField(value = "分组")
    public int group;

    @NoteField(value = "录像uid")
    public String replayUid;

    @NoteField(value = "队伍")
    public byte team;

    @NoteField(value = "位置")
    public byte pos;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        EcResult<Void> r = game.videoHall.videoHeroDetail(cc.getRole(), group, replayUid,team,pos);
        if(!r.ok()){
            game.notice.message(cc.getRole(), r.message);
        }
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBVideoHall.VIDEO_HERO_REQ;
    }
}
